<span class='l l-1 source lua'><s class='keyword control lua' data-entity-scope='keyword.control.lua'>local</s> IO <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> <s class='support function lua' data-entity-scope='support.function.lua'>require</s> <s class='string quoted double lua' data-entity-scope='string.quoted.double.lua'><s class='punctuation definition string begin lua' data-entity-scope='punctuation.definition.string.begin.lua'>&quot;</s>kong.tools.io<s class='punctuation definition string end lua' data-entity-scope='punctuation.definition.string.end.lua'>&quot;</s></s>
</span><span class='l l-2 source lua'><s class='keyword control lua' data-entity-scope='keyword.control.lua'>local</s> utils <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> <s class='support function lua' data-entity-scope='support.function.lua'>require</s> <s class='string quoted double lua' data-entity-scope='string.quoted.double.lua'><s class='punctuation definition string begin lua' data-entity-scope='punctuation.definition.string.begin.lua'>&quot;</s>kong.tools.utils<s class='punctuation definition string end lua' data-entity-scope='punctuation.definition.string.end.lua'>&quot;</s></s>
</span><span class='l l-3 source lua'><s class='keyword control lua' data-entity-scope='keyword.control.lua'>local</s> cache <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> <s class='support function lua' data-entity-scope='support.function.lua'>require</s> <s class='string quoted double lua' data-entity-scope='string.quoted.double.lua'><s class='punctuation definition string begin lua' data-entity-scope='punctuation.definition.string.begin.lua'>&quot;</s>kong.tools.database_cache<s class='punctuation definition string end lua' data-entity-scope='punctuation.definition.string.end.lua'>&quot;</s></s>
</span><span class='l l-4 source lua'><s class='keyword control lua' data-entity-scope='keyword.control.lua'>local</s> stringy <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> <s class='support function lua' data-entity-scope='support.function.lua'>require</s> <s class='string quoted double lua' data-entity-scope='string.quoted.double.lua'><s class='punctuation definition string begin lua' data-entity-scope='punctuation.definition.string.begin.lua'>&quot;</s>stringy<s class='punctuation definition string end lua' data-entity-scope='punctuation.definition.string.end.lua'>&quot;</s></s>
</span><span class='l l-5 source lua'><s class='keyword control lua' data-entity-scope='keyword.control.lua'>local</s> constants <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> <s class='support function lua' data-entity-scope='support.function.lua'>require</s> <s class='string quoted double lua' data-entity-scope='string.quoted.double.lua'><s class='punctuation definition string begin lua' data-entity-scope='punctuation.definition.string.begin.lua'>&quot;</s>kong.constants<s class='punctuation definition string end lua' data-entity-scope='punctuation.definition.string.end.lua'>&quot;</s></s>
</span><span class='l l-6 source lua'><s class='keyword control lua' data-entity-scope='keyword.control.lua'>local</s> responses <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> <s class='support function lua' data-entity-scope='support.function.lua'>require</s> <s class='string quoted double lua' data-entity-scope='string.quoted.double.lua'><s class='punctuation definition string begin lua' data-entity-scope='punctuation.definition.string.begin.lua'>&quot;</s>kong.tools.responses<s class='punctuation definition string end lua' data-entity-scope='punctuation.definition.string.end.lua'>&quot;</s></s>
</span><span class='l l-7 source lua'><s class='keyword control lua' data-entity-scope='keyword.control.lua'>local</s> timestamp <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> <s class='support function lua' data-entity-scope='support.function.lua'>require</s> <s class='string quoted double lua' data-entity-scope='string.quoted.double.lua'><s class='punctuation definition string begin lua' data-entity-scope='punctuation.definition.string.begin.lua'>&quot;</s>kong.tools.timestamp<s class='punctuation definition string end lua' data-entity-scope='punctuation.definition.string.end.lua'>&quot;</s></s>
</span><span class='l l-8 source lua'>
</span><span class='l l-9 source lua'><s class='comment line double-dash lua' data-entity-scope='comment.line.double-dash.lua'><s class='punctuation definition comment lua' data-entity-scope='punctuation.definition.comment.lua'>--</s> Define the plugins to load here, in the appropriate order
</s></span><span class='l l-10 source lua'><s class='keyword control lua' data-entity-scope='keyword.control.lua'>local</s> plugins <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> {}
</span><span class='l l-11 source lua'>
</span><span class='l l-12 source lua'><s class='keyword control lua' data-entity-scope='keyword.control.lua'>local</s> _M <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> {}
</span><span class='l l-13 source lua'>
</span><span class='l l-14 source lua'><s class='keyword control lua' data-entity-scope='keyword.control.lua'>local</s> <s class='meta function lua' data-entity-scope='meta.function.lua'><s class='keyword control lua' data-entity-scope='keyword.control.lua'>function</s> <s class='entity name function lua' data-entity-scope='entity.name.function.lua'>load_plugin_conf</s><s class='punctuation definition parameters begin lua' data-entity-scope='punctuation.definition.parameters.begin.lua'>(</s><s class='variable parameter function lua' data-entity-scope='variable.parameter.function.lua'>api_id, consumer_id, plugin_name</s><s class='punctuation definition parameters end lua' data-entity-scope='punctuation.definition.parameters.end.lua'>)</s></s>
</span><span class='l l-15 source lua'>  <s class='keyword control lua' data-entity-scope='keyword.control.lua'>local</s> cache_key <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> cache.plugin_configuration_key(plugin_name, api_id, consumer_id)
</span><span class='l l-16 source lua'>
</span><span class='l l-17 source lua'>  <s class='keyword control lua' data-entity-scope='keyword.control.lua'>local</s> plugin <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> cache.get_and_set(cache_key, <s class='keyword control lua' data-entity-scope='keyword.control.lua'>function</s>()
</span><span class='l l-18 source lua'>    <s class='keyword control lua' data-entity-scope='keyword.control.lua'>local</s> rows, err <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> dao.plugins_configurations:find_by_keys {
</span><span class='l l-19 source lua'>        api_id <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> api_id,
</span><span class='l l-20 source lua'>        consumer_id <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> consumer_id <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>~=</s> <s class='constant language lua' data-entity-scope='constant.language.lua'>nil</s> <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>and</s> consumer_id <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>or</s> constants.DATABASE_NULL_ID,
</span><span class='l l-21 source lua'>        name <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> plugin_name
</span><span class='l l-22 source lua'>      }
</span><span class='l l-23 source lua'>      <s class='keyword control lua' data-entity-scope='keyword.control.lua'>if</s> err <s class='keyword control lua' data-entity-scope='keyword.control.lua'>then</s>
</span><span class='l l-24 source lua'>        <s class='keyword control lua' data-entity-scope='keyword.control.lua'>return</s> responses.send_HTTP_INTERNAL_SERVER_ERROR(err)
</span><span class='l l-25 source lua'>      <s class='keyword control lua' data-entity-scope='keyword.control.lua'>end</s>
</span><span class='l l-26 source lua'>
</span><span class='l l-27 source lua'>      <s class='keyword control lua' data-entity-scope='keyword.control.lua'>if</s> <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>#</s>rows <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>&gt;</s> <s class='constant numeric lua' data-entity-scope='constant.numeric.lua'>0</s> <s class='keyword control lua' data-entity-scope='keyword.control.lua'>then</s>
</span><span class='l l-28 source lua'>        <s class='keyword control lua' data-entity-scope='keyword.control.lua'>return</s> <s class='support function library lua' data-entity-scope='support.function.library.lua'>table.remove</s>(rows, <s class='constant numeric lua' data-entity-scope='constant.numeric.lua'>1</s>)
</span><span class='l l-29 source lua'>      <s class='keyword control lua' data-entity-scope='keyword.control.lua'>else</s>
</span><span class='l l-30 source lua'>        <s class='keyword control lua' data-entity-scope='keyword.control.lua'>return</s> { null <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> <s class='constant language lua' data-entity-scope='constant.language.lua'>true</s> }
</span><span class='l l-31 source lua'>      <s class='keyword control lua' data-entity-scope='keyword.control.lua'>end</s>
</span><span class='l l-32 source lua'>  <s class='keyword control lua' data-entity-scope='keyword.control.lua'>end</s>)
</span><span class='l l-33 source lua'>
</span><span class='l l-34 source lua'>  <s class='keyword control lua' data-entity-scope='keyword.control.lua'>if</s> plugin <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>and</s> not plugin.null <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>and</s> plugin.enabled <s class='keyword control lua' data-entity-scope='keyword.control.lua'>then</s>
</span><span class='l l-35 source lua'>    <s class='keyword control lua' data-entity-scope='keyword.control.lua'>return</s> plugin
</span><span class='l l-36 source lua'>  <s class='keyword control lua' data-entity-scope='keyword.control.lua'>else</s>
</span><span class='l l-37 source lua'>    <s class='keyword control lua' data-entity-scope='keyword.control.lua'>return</s> <s class='constant language lua' data-entity-scope='constant.language.lua'>nil</s>
</span><span class='l l-38 source lua'>  <s class='keyword control lua' data-entity-scope='keyword.control.lua'>end</s>
</span><span class='l l-39 source lua'><s class='keyword control lua' data-entity-scope='keyword.control.lua'>end</s>
</span><span class='l l-40 source lua'>
</span><span class='l l-41 source lua'><s class='keyword control lua' data-entity-scope='keyword.control.lua'>local</s> <s class='meta function lua' data-entity-scope='meta.function.lua'><s class='keyword control lua' data-entity-scope='keyword.control.lua'>function</s> <s class='entity name function lua' data-entity-scope='entity.name.function.lua'>init_plugins</s><s class='punctuation definition parameters begin lua' data-entity-scope='punctuation.definition.parameters.begin.lua'>(</s><s class='punctuation definition parameters end lua' data-entity-scope='punctuation.definition.parameters.end.lua'>)</s></s>
</span><span class='l l-42 source lua'>  configuration.plugins_available <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> configuration.plugins_available <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>and</s> configuration.plugins_available <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>or</s> {}
</span><span class='l l-43 source lua'>
</span><span class='l l-44 source lua'>  <s class='support function lua' data-entity-scope='support.function.lua'>print</s>(<s class='string quoted double lua' data-entity-scope='string.quoted.double.lua'><s class='punctuation definition string begin lua' data-entity-scope='punctuation.definition.string.begin.lua'>&quot;</s>Discovering used plugins. Please wait..<s class='punctuation definition string end lua' data-entity-scope='punctuation.definition.string.end.lua'>&quot;</s></s>)
</span><span class='l l-45 source lua'>  <s class='keyword control lua' data-entity-scope='keyword.control.lua'>local</s> db_plugins, err <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> dao.plugins_configurations:find_distinct()
</span><span class='l l-46 source lua'>  <s class='keyword control lua' data-entity-scope='keyword.control.lua'>if</s> err <s class='keyword control lua' data-entity-scope='keyword.control.lua'>then</s>
</span><span class='l l-47 source lua'>    <s class='support function lua' data-entity-scope='support.function.lua'>error</s>(err)
</span><span class='l l-48 source lua'>  <s class='keyword control lua' data-entity-scope='keyword.control.lua'>end</s>
</span><span class='l l-49 source lua'>
</span><span class='l l-50 source lua'>  <s class='comment line double-dash lua' data-entity-scope='comment.line.double-dash.lua'><s class='punctuation definition comment lua' data-entity-scope='punctuation.definition.comment.lua'>--</s> Checking that the plugins in the DB are also enabled
</s></span><span class='l l-51 source lua'>  <s class='keyword control lua' data-entity-scope='keyword.control.lua'>for</s> _, v <s class='keyword control lua' data-entity-scope='keyword.control.lua'>in</s> <s class='support function lua' data-entity-scope='support.function.lua'>ipairs</s>(db_plugins) <s class='keyword control lua' data-entity-scope='keyword.control.lua'>do</s>
</span><span class='l l-52 source lua'>    <s class='keyword control lua' data-entity-scope='keyword.control.lua'>if</s> not utils.table_contains(configuration.plugins_available, v) <s class='keyword control lua' data-entity-scope='keyword.control.lua'>then</s>
</span><span class='l l-53 source lua'>      <s class='support function lua' data-entity-scope='support.function.lua'>error</s>(<s class='string quoted double lua' data-entity-scope='string.quoted.double.lua'><s class='punctuation definition string begin lua' data-entity-scope='punctuation.definition.string.begin.lua'>&quot;</s>You are using a plugin that has not been enabled in the configuration: <s class='punctuation definition string end lua' data-entity-scope='punctuation.definition.string.end.lua'>&quot;</s></s><s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>..</s>v)
</span><span class='l l-54 source lua'>    <s class='keyword control lua' data-entity-scope='keyword.control.lua'>end</s>
</span><span class='l l-55 source lua'>  <s class='keyword control lua' data-entity-scope='keyword.control.lua'>end</s>
</span><span class='l l-56 source lua'>
</span><span class='l l-57 source lua'>  <s class='keyword control lua' data-entity-scope='keyword.control.lua'>local</s> unsorted_plugins <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> {} <s class='comment line double-dash lua' data-entity-scope='comment.line.double-dash.lua'><s class='punctuation definition comment lua' data-entity-scope='punctuation.definition.comment.lua'>--</s> It&#39;s a multivalue table: k1 = {v1, v2, v3}, k2 = {...}
</s></span><span class='l l-58 source lua'>
</span><span class='l l-59 source lua'>  <s class='keyword control lua' data-entity-scope='keyword.control.lua'>for</s> _, v <s class='keyword control lua' data-entity-scope='keyword.control.lua'>in</s> <s class='support function lua' data-entity-scope='support.function.lua'>ipairs</s>(configuration.plugins_available) <s class='keyword control lua' data-entity-scope='keyword.control.lua'>do</s>
</span><span class='l l-60 source lua'>    <s class='keyword control lua' data-entity-scope='keyword.control.lua'>local</s> loaded, mod <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> utils.load_module_if_exists(<s class='string quoted double lua' data-entity-scope='string.quoted.double.lua'><s class='punctuation definition string begin lua' data-entity-scope='punctuation.definition.string.begin.lua'>&quot;</s>kong.plugins.<s class='punctuation definition string end lua' data-entity-scope='punctuation.definition.string.end.lua'>&quot;</s></s><s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>..</s>v<s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>..</s><s class='string quoted double lua' data-entity-scope='string.quoted.double.lua'><s class='punctuation definition string begin lua' data-entity-scope='punctuation.definition.string.begin.lua'>&quot;</s>.handler<s class='punctuation definition string end lua' data-entity-scope='punctuation.definition.string.end.lua'>&quot;</s></s>)
</span><span class='l l-61 source lua'>    <s class='keyword control lua' data-entity-scope='keyword.control.lua'>if</s> not loaded <s class='keyword control lua' data-entity-scope='keyword.control.lua'>then</s>
</span><span class='l l-62 source lua'>      <s class='support function lua' data-entity-scope='support.function.lua'>error</s>(<s class='string quoted double lua' data-entity-scope='string.quoted.double.lua'><s class='punctuation definition string begin lua' data-entity-scope='punctuation.definition.string.begin.lua'>&quot;</s>The following plugin has been enabled in the configuration but is not installed on the system: <s class='punctuation definition string end lua' data-entity-scope='punctuation.definition.string.end.lua'>&quot;</s></s><s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>..</s>v)
</span><span class='l l-63 source lua'>    <s class='keyword control lua' data-entity-scope='keyword.control.lua'>else</s>
</span><span class='l l-64 source lua'>      <s class='support function lua' data-entity-scope='support.function.lua'>print</s>(<s class='string quoted double lua' data-entity-scope='string.quoted.double.lua'><s class='punctuation definition string begin lua' data-entity-scope='punctuation.definition.string.begin.lua'>&quot;</s>Loading plugin: <s class='punctuation definition string end lua' data-entity-scope='punctuation.definition.string.end.lua'>&quot;</s></s><s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>..</s>v)
</span><span class='l l-65 source lua'>      <s class='keyword control lua' data-entity-scope='keyword.control.lua'>local</s> plugin_handler <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> mod()
</span><span class='l l-66 source lua'>      <s class='keyword control lua' data-entity-scope='keyword.control.lua'>local</s> priority <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> plugin_handler.PRIORITY <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>and</s> plugin_handler.PRIORITY <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>or</s> <s class='constant numeric lua' data-entity-scope='constant.numeric.lua'>0</s>
</span><span class='l l-67 source lua'>
</span><span class='l l-68 source lua'>      <s class='comment line double-dash lua' data-entity-scope='comment.line.double-dash.lua'><s class='punctuation definition comment lua' data-entity-scope='punctuation.definition.comment.lua'>--</s> Add plugin to the right priority
</s></span><span class='l l-69 source lua'>      <s class='keyword control lua' data-entity-scope='keyword.control.lua'>local</s> list <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> unsorted_plugins[priority]
</span><span class='l l-70 source lua'>      <s class='keyword control lua' data-entity-scope='keyword.control.lua'>if</s> not list <s class='keyword control lua' data-entity-scope='keyword.control.lua'>then</s> list <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> {} <s class='keyword control lua' data-entity-scope='keyword.control.lua'>end</s> <s class='comment line double-dash lua' data-entity-scope='comment.line.double-dash.lua'><s class='punctuation definition comment lua' data-entity-scope='punctuation.definition.comment.lua'>--</s> The list is required in case more plugins share the same priority level
</s></span><span class='l l-71 source lua'>      <s class='support function library lua' data-entity-scope='support.function.library.lua'>table.insert</s>(list, {
</span><span class='l l-72 source lua'>        name <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> v,
</span><span class='l l-73 source lua'>        handler <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> plugin_handler
</span><span class='l l-74 source lua'>      })
</span><span class='l l-75 source lua'>      unsorted_plugins[priority] <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> list
</span><span class='l l-76 source lua'>    <s class='keyword control lua' data-entity-scope='keyword.control.lua'>end</s>
</span><span class='l l-77 source lua'>  <s class='keyword control lua' data-entity-scope='keyword.control.lua'>end</s>
</span><span class='l l-78 source lua'>
</span><span class='l l-79 source lua'>  <s class='keyword control lua' data-entity-scope='keyword.control.lua'>local</s> result <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> {}
</span><span class='l l-80 source lua'>
</span><span class='l l-81 source lua'>  <s class='comment line double-dash lua' data-entity-scope='comment.line.double-dash.lua'><s class='punctuation definition comment lua' data-entity-scope='punctuation.definition.comment.lua'>--</s> Now construct the final ordered plugin list
</s></span><span class='l l-82 source lua'>  <s class='comment line double-dash lua' data-entity-scope='comment.line.double-dash.lua'><s class='punctuation definition comment lua' data-entity-scope='punctuation.definition.comment.lua'>--</s> resolver is always the first plugin as it is the one retrieving any needed information
</s></span><span class='l l-83 source lua'>  <s class='support function library lua' data-entity-scope='support.function.library.lua'>table.insert</s>(result, {
</span><span class='l l-84 source lua'>    resolver <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> <s class='constant language lua' data-entity-scope='constant.language.lua'>true</s>,
</span><span class='l l-85 source lua'>    name <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> <s class='string quoted double lua' data-entity-scope='string.quoted.double.lua'><s class='punctuation definition string begin lua' data-entity-scope='punctuation.definition.string.begin.lua'>&quot;</s>resolver<s class='punctuation definition string end lua' data-entity-scope='punctuation.definition.string.end.lua'>&quot;</s></s>,
</span><span class='l l-86 source lua'>    handler <s class='keyword operator lua' data-entity-scope='keyword.operator.lua'>=</s> <s class='support function lua' data-entity-scope='support.function.lua'>require</s>(<s class='string quoted double lua' data-entity-scope='string.quoted.double.lua'><s class='punctuation definition string begin lua' data-entity-scope='punctuation.definition.string.begin.lua'>&quot;</s>kong.resolver.handler<s class='punctuation definition string end lua' data-entity-scope='punctuation.definition.string.end.lua'>&quot;</s></s>)()
</span><span class='l l-87 source lua'>  })
</span><span class='l l-88 source lua'>
</span><span class='l l-89 source lua'>  <s class='comment line double-dash lua' data-entity-scope='comment.line.double-dash.lua'><s class='punctuation definition comment lua' data-entity-scope='punctuation.definition.comment.lua'>--</s> Add the plugins in a sorted order
</s></span><span class='l l-90 source lua'>  <s class='keyword control lua' data-entity-scope='keyword.control.lua'>for</s> _, v <s class='keyword control lua' data-entity-scope='keyword.control.lua'>in</s> utils.sort_table_iter(unsorted_plugins, utils.sort.descending) <s class='keyword control lua' data-entity-scope='keyword.control.lua'>do</s> <s class='comment line double-dash lua' data-entity-scope='comment.line.double-dash.lua'><s class='punctuation definition comment lua' data-entity-scope='punctuation.definition.comment.lua'>--</s> In descending order
</s></span><span class='l l-91 source lua'>    <s class='keyword control lua' data-entity-scope='keyword.control.lua'>if</s> v <s class='keyword control lua' data-entity-scope='keyword.control.lua'>then</s>
</span><span class='l l-92 source lua'>      <s class='keyword control lua' data-entity-scope='keyword.control.lua'>for</s> _, p <s class='keyword control lua' data-entity-scope='keyword.control.lua'>in</s> <s class='support function lua' data-entity-scope='support.function.lua'>ipairs</s>(v) <s class='keyword control lua' data-entity-scope='keyword.control.lua'>do</s>
</span><span class='l l-93 source lua'>        <s class='support function library lua' data-entity-scope='support.function.library.lua'>table.insert</s>(result, p)
</span><span class='l l-94 source lua'>      <s class='keyword control lua' data-entity-scope='keyword.control.lua'>end</s>
</span><span class='l l-95 source lua'>    <s class='keyword control lua' data-entity-scope='keyword.control.lua'>end</s>
</span><span class='l l-96 source lua'>  <s class='keyword control lua' data-entity-scope='keyword.control.lua'>end</s>
</span><span class='l l-97 source lua'>
</span><span class='l l-98 source lua'>  <s class='keyword control lua' data-entity-scope='keyword.control.lua'>return</s> result
</span><span class='l l-99 source lua'><s class='keyword control lua' data-entity-scope='keyword.control.lua'>end</s></span>
